package org.openstock.impl.def.charting.ui.swing.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import org.openstock.impl.def.charting.ui.swing.presenter.DefaultStockMultiChartViewPresenter;
import org.openstock.impl.def.core.factory.Factory;

public class NewChartActionListener implements ActionListener {

	private DefaultStockMultiChartViewPresenter presenter;
	
	@Override
	public void actionPerformed(ActionEvent e) {
		if(presenter == null){
			presenter = Factory.getSingleton(DefaultStockMultiChartViewPresenter.class);
		}
		if(presenter != null){
			presenter.present();
		}
	}

}
